package com.bill.messages.example;

import java.io.File;
 
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.bill.messages.MessageService;

 
public class ExampleMessageService {
public static void main(String[] _){
	 
	String applicationfile="com/bill/messages/example/messageservice.xml";
	 
	ApplicationContext ctx=new   
	ClassPathXmlApplicationContext (applicationfile);
	 MessageService messageservice = ctx.getBean(MessageService.class);
	 messageservice.configure();
	 messageservice.setSubject("essai d'envoi de message");
	 messageservice.addAttachFile(new File("//home/thunder/luna.pdf"));
	  messageservice.send();
	 
}
}
